
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<HTML>

    <HEAD>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <TITLE>Miage Book</TITLE>

        <link rel="stylesheet" href="css/menu_H.css" type="text/css"  media="screen" />
        <link rel="stylesheet" href="css/text_style.css" type="text/css"  media="screen" />
        <link rel="stylesheet" href="css/menu_V.css" type="text/css"  media="screen" />
        <link rel="stylesheet" href="css/menuadmin2.css" type="text/css"  media="screen" />
        <link rel="stylesheet" href="css/section.css" type="text/css"  media="screen" />
        <link rel="stylesheet" href="css/structure.css" type="text/css"  media="screen" />

        <style type="text/css">
            fieldset {
                width:500px;
                padding:20px;
                margin-bottom:10px;
            }

        </style>

    </HEAD>

    <BODY bgcolor="#999999">

        <CENTER>

            <div class="principal"" >

                 <!-- Bannière -->
                 <div class ="banniere">
                    <div class="infoSession"><%@include file = "infoSession.jsp" %></div>
                </div>

                <%@include file = "menu.jsp" %>

                <!-- Page principale en fonction du bouton du menu cliqué, profil par défaut si !MembreAdministration, consulter sinon-->

                <c:if test="${empty erreur}" >
                    <c:choose>
                        <c:when test="${action == 'profil'}"><%@include file = "profil.jsp" %></c:when>
                        <c:when test="${action == 'gestionMaitre'}"><%@include file = "gestionMaitre.jsp" %></c:when>
                        <c:when test="${action == 'retourTuteur'}"><%@include file = "retourTuteur.jsp" %></c:when>
                        <c:when test="${action == 'retourMaitre'}"><%@include file = "retourMaitre.jsp" %></c:when>
                        <c:when test="${action == 'retourAdmin'}"><%@include file = "retourAdmin.jsp" %></c:when>
                        <c:when test="${action == 'consulter'}"><%@include file = "consulter.jsp" %></c:when>
                        <c:when test="${action == 'consulterAdmin'}"><%@include file = "consulterAdmin.jsp" %></c:when>
                        <c:when test="${action == 'ajoutModifMaitre'}"><%@include file = "ajoutModifMaitre.jsp" %></c:when>
                        <c:when test="${action == 'retourMatiere'}"><%@include file = "retourMatiere.jsp" %></c:when>
                        <c:when test="${action == 'retoursMatiere'}"><%@include file = "retoursMatiere.jsp" %></c:when>
                        <c:when test="${action == 'profilIntervenant'}"><%@include file = "profilIntervenant.jsp" %></c:when>
                        <c:when test="${action == 'consulterLivret'}"><%@include file = "consulterLivret.jsp" %></c:when>
                        <c:when test="${action == 'ajoutModifMaitre'}"><%@include file = "ajoutModifMaitre.jsp" %></c:when>
                        <c:otherwise><%@include file = "erreur.jsp" %></c:otherwise>
                    </c:choose>
                </c:if>

                <c:if test="${not empty erreur}" >
                    <%@include file = "erreur.jsp" %>
                </c:if>


                <%-- Tentatives d'éviter d'avoir un choose when énorme :

                <jsp:include page='<%= request.getAttribute("page") %>' />

                 <jsp:include page="${page}" />  //ne transmet pas les variables de session

                <jsp:include page="${page}">
                    <jsp:param name="identifie" value="${identifie}" />
                    <jsp:param name="typePersonne" value="${typePersonne}"/>
                </jsp:include>

                  <%@include file = '${page}' %>

                <%
                String paged = (String) request.getAttribute("page");
                %>
                <jsp:include page="<%=paged%>"/>

                --%>

            </div>
        </CENTER>
    </BODY>
</HTML>
